#pragma once

#include <regext.h>

// Define this when taking screenshots to get a nice titlebar
//#define DEBUG_SCREENSHOTS

#define TB_CARRIER_LENGTH 50
#define TB_TIME_LENGTH    16

enum ETitlebarData
{
  tbdSignal      = 0x01,
  tbdOperator    = 0x02,
  tbdTime        = 0x04,
  tbdBattery     = 0x08,
  tbdBluetooth   = 0x10,
  tbdVolume      = 0x20,
  tbdConnections = 0x40,
  tbdOther       = 0x80,
  tbdCount
};

class Titlebar
{
public:
  static void Initialize(HWND);
  static void Terminate();

  static void Refresh(UINT);
  static void Draw(HDC, RECT);

protected:
  static HREGNOTIFY arrNotify[tbdCount];

  static int   nBattery; //0-100
  static int   nBars; //0-5
  static TCHAR szCarrier[TB_CARRIER_LENGTH];
  static TCHAR szTime[TB_TIME_LENGTH];

  static bool bCharging;
  static bool bBluetooth;
  static bool bSpeakerOn;
  static bool bVibrate;
  static bool bWifi;
  static bool bLocked;
  static bool bAlarm;
  static bool bA2dp;
  static bool bConnection;
};